<template>
    <div>
        <el-card>
            <!-- <AlertForm></AlertForm> -->
            <br>
            <alertTable  v-loading="listLoading"  :tableData="tableData"></alertTable>
            <br>
            <alertDatapage class="page" :page="tableData"></alertDatapage>
        </el-card>
    </div>
</template>
<script>
import alertTable from './component/alertTable'
import alertDatapage from './component/alertDatapage'
import AlertForm from './component/AlertForm'

import { mapGetters } from 'vuex'
export default {
  components: {
    alertTable,
    alertDatapage,
    AlertForm
  },
  computed: {
    ...mapGetters([
      'tableData'
    ])
  },
  data() {
    return {
       listLoading: false
    }
  },
  methods: {
    getTableData() {
      this.listLoading = true
      this.$store.dispatch('getTableData').then(() => {
        this.listLoading = false
      })
    }
  },
  created() {
    this.getTableData()
  }
}
</script>
<style scoped>
.page{
  float: right;
  margin-bottom: 10px;
}
</style>

